package com.ynny.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
public class ConsumerController {
    @Qualifier("com.ynny.controller.HIService")
    @Autowired
    HIService client;

    @GetMapping("/consumer/hello")
    public String hello(@RequestParam(value = "username",required = false) String username){
        return client.hello( username);
    }
}
